﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Knjiga
{
    public partial class WebForm3 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write("Zdravo svima"); 
        }


         protected void ddlSelected(object sender, EventArgs e)
         {
             labela.Text = ddl1.SelectedItem.Value.ToString() + " je odabrana na padajucoj listi";
         }

         protected void chblSelected(object sender, EventArgs e)
         {
             labela.Text = "";
             for (int i = 0; i < chbl1.Items.Count; i++)
             {
                 if (chbl1.Items[i].Selected)
                 {
                     labela.Text += "Polje za potvrdu " + i.ToString() + " " + chbl1.Items[i].Text + " je potvrdjeno<br>";
                 }
                 else
                 {
                     labela.Text += "Polje za potvrdu " + i.ToString() + " NIJE potvrdjeno<br>";
                 }

             }
         }

     
         protected void rblSelected(object sender, EventArgs e)
         {
             var i =-1;
             i=rbl1.SelectedIndex;
             switch(i)
             {
                 case 0: labela.Text = "musko je";
                     break;
                 case 1: labela.Text = "zensko je";
                     break;
                 default: labela.Text = "selektujte pol";
                     break;
             
             }
         }
    }
}